home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 725 b | 32 lines | [TEXT/CWIE] |
- // FilePermission.h
-
- #ifndef FilePermission_h
- #define FilePermission_h
-
- #ifndef Integers_h
- #include "Integers.h"
- #endif
-
- class FilePermission
- {
- private:
- int8 permission;
-
- FilePermission( int16 value )
- : permission( value )
- {}
-
- public:
- static FilePermission ReadOnly() { return fsRdPerm; }
- static FilePermission ReadWrite() { return fsWrPerm; }
- static FilePermission Available() { return fsCurPerm; }
- static FilePermission Shared() { return fsRdWrShPerm; }
-
- int8 Value() const { return permission; }
-
- bool operator==( FilePermission f ) const { return permission == f.permission; }
- bool operator!=( FilePermission f ) const { return permission != f.permission; }
- };
-
- #endif
-